[% page.title = 'API Method: profiles list' 
   page.tab = 'api'
%]

<h2>GET /:user_id/profiles</h2>
<p>Returns a list of profiles folders with a 200 OK HTTP status code.</p>

<h3>URL:</h3>
<code>[% site.url %]/<em>user_id</em>/profiles.<em>format</em></code>

<h3>Formats (<a href="formats">about return formats</a>):</h3>
<code>[% INCLUDE 'api/_formats.phtml' %]</code>

<h3>HTTP Methods (<a href="http-methods">about HTTP methods</a>):</h3>
<code>GET</code>

<h3>Requires Authentication (<a href="authentication">about authentication</a>):</h3>
<code>true</code> &nbsp;if folder's <code>mode</code> property is set to <code>private</code><br/>
<code>false</code> &nbsp;if folder's <code>mode</code> property is set to <code>public</code>

<h3>Parameters:</h3>
<ul>
<li><code>sort</code>.  Optional. Number of the term data column to sort the returned <code>term</code> statistics on.
Numeric data columns are sorted in descending order. Textual data columns are sorted in ascending alphabetical order.
Values of <code>sort</code> must be one of:
<ul>
<li><code>0</code> for <code>name</code>, the term name (i.e. the text of the word or keyword)</li>
<li><code>1</code> for <code>n</code>, the term occurrences (i.e. the total number of times a term occurs across all items in the document)</li>
<li><code>2</code> for <code>dt</code>, the document term count (i.e. the total number items in the document in which the term occurs)</li>
</ul>
The default when no value is supplied is <code>2</code>.
</li>
<li><code><em>full</em></code>.  Optional. Whether to include the <code>term</code> data in the returned representation of the folder of the profiles folder.
Values can be either <code>1</code> for true or <code>0</code> for false. The default is <code>0</code>.
<ul>
<li>Example: <code>[% site.url %]/kdd09/profiles.xml</code></li>
</ul>
</li>
<li><code><em>items</em></code>.  Optional. Whether to include the <code>item</code> data in the returned representation of the profile folders.
Values can be either <code>1</code> for true or <code>0</code> for false. The default is <code>0</code>.
</li>
</ul>

<h3>Usage Examples:</h3>
<blockquote>
<h4>cURL (<a href="curl">about cURL</a>):</h4>
<code>curl [% site.url %]/kdd09/profiles</code><br/>
</blockquote>

<h3>Response (<a href="return-values">about return values</a>):</h3>
<blockquote>
<h4>XML example:</h4>
<pre>[% FILTER html -%]
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <folder>
    <id>pc</id>
    <document_id>pc</document_id>
    <created>1266793611</created>
    <description>KDD09 Programme Committee</description>
    <ignore_case>1</ignore_case>
    <limit>100000</limit>
    <mode>private</mode>
    <modified>1268566365</modified>
    <ngrams>1,2</ngrams>
    <remove_html>1</remove_html>
    <remove_stopwords>1</remove_stopwords>
    <stopwords>a,about,above,across, ... ,yourselves</stopwords>
    <threshold>0</threshold>
  </folder>
  <folder>
    <id>chairs</id>
    <document_id>chairs</document_id>
    <created>1266793919</created>
    <description>KDD09 Area Chairs</description>
    <ignore_case>1</ignore_case>
    <limit>100</limit>
    <mode>private</mode>
    <modified>126856919</modified>
    <ngrams>1,2</ngrams>
    <remove_html>1</remove_html>
    <remove_stopwords>1</remove_stopwords>
    <stopwords>a,about,above,across, ... ,yourselves</stopwords>
    <threshold>0</threshold>
  </folder>
  .
  .
  .
  <folder>
    <id>pc2</id>
    <document_id>pc</document_id>
    <created>1266793777</created>
    <description>KDD09 Programme Committee</description>
    <ignore_case>0</ignore_case>
    <limit>100000</limit>
    <mode>private</mode>
    <modified>126856777</modified>
    <ngrams>1,2,3</ngrams>
    <remove_html>1</remove_html>
    <remove_stopwords>1</remove_stopwords>
    <stopwords>paper,position paper,short paper, ... ,proceedings</stopwords>
    <threshold>0</threshold>
  </folder>
</result>
[% END %]</pre>
</blockquote>

